package xixirupan.tmgp.tencent.com.vmeim.ui.beautyshop.view;

import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.widget.ImageView;
import android.widget.LinearLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import xixirupan.tmgp.tencent.com.vmeim.R;
import xixirupan.tmgp.tencent.com.vmeim.ui.beautyshop.presenter.CategoryPresenter;

public class CategoryActivity extends AppCompatActivity {
    private Context context;
    private Handler handler =new Handler();
    CategoryPresenter presenter;
    @BindView(R.id.category_goback)
    ImageView categoryGoback;
    @BindView(R.id.category_recyclerview)
    RecyclerView categoryRecyclerview;
    @BindView(R.id.activity_category)
    LinearLayout activityCategory;
    private Unbinder bind;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_category);
        bind = ButterKnife.bind(this);
        context =this;
       presenter =new CategoryPresenter(categoryRecyclerview,context,getLayoutInflater());

    }


    @OnClick(R.id.category_goback)
    public void onClick() {
        //返回按钮
        finish();
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        finish();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        bind.unbind();
    }
}
